﻿<%@ Page Language="C#" MasterPageFile="~/teachers/masterpage.Master" AutoEventWireup="true" CodeBehind="TPProfile.aspx.cs" Inherits="ESCHOOL.teachers.WebForm11" Title="Parent Profile" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <style type="text/css">
        .style7
        {
            width: 100%;
        }
        .style8
        {
            height: 214px;
        }
        .style9
        {
            width: 504px;
        }
        </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <p>
        &nbsp;</p>
    <p>
        <br />
    </p>
    <asp:Panel ID="Panel1" runat="server" Width="520px">
        <table class="style9">
            <tr>
                <td>
                    &nbsp;</td>
                <td>
                    <asp:TextBox ID="tbparid" runat="server" Visible="False"></asp:TextBox>
                    <asp:TextBox ID="tbstudid" runat="server" Visible="False"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td>
                    Father Name</td>
                <td>
                    <asp:TextBox ID="tbfname" runat="server"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                        ControlToValidate="tbfname" ErrorMessage="Plz enter"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td>
                    Mother Name</td>
                <td>
                    <asp:TextBox ID="tbmname" runat="server"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" 
                        ControlToValidate="tbmname" ErrorMessage="Plz enter"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td>
                    Father Qualification</td>
                <td>
                    <asp:TextBox ID="tbfquali" runat="server"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" 
                        ControlToValidate="tbfquali" ErrorMessage="Plz enter"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td>
                    Mother Qualification<p>
                    </p>
                </td>
                <td>
                    <asp:TextBox ID="tbmquali" runat="server"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" 
                        ControlToValidate="tbmquali" ErrorMessage="Plz enter"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td>
                    Father Occupation</td>
                <td>
                    <asp:TextBox ID="tbfoccu" runat="server"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" 
                        ControlToValidate="tbfoccu" ErrorMessage="Plz enter"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td>
                    Mother Occupation</td>
                <td>
                    <asp:TextBox ID="tbmoccu" runat="server"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" 
                        ControlToValidate="tbmoccu" ErrorMessage="Plz enter"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td>
                    Address</td>
                <td>
                    <asp:TextBox ID="tbaddress" runat="server"></asp:TextBox>
                    <asp:RequiredFieldValidator ID="RequiredFieldValidator7" runat="server" 
                        ControlToValidate="tbaddress" ErrorMessage="Plz enter full address"></asp:RequiredFieldValidator>
                </td>
            </tr>
            <tr>
                <td>
                    Phone No.</td>
                <td>
                    <asp:TextBox ID="tbpno" runat="server"></asp:TextBox>
                    <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" 
                        ControlToValidate="tbpno" ErrorMessage="(0XXXXXXXXX) Format" 
                        ValidationExpression="(0\d{3}\d{6})"></asp:RegularExpressionValidator>
                </td>
            </tr>
            <tr>
                <td>
                    Email id</td>
                <td>
                    <asp:TextBox ID="tbemail" runat="server"></asp:TextBox>
                    <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" 
                        ControlToValidate="tbemail" ErrorMessage="(ex. abc@gmail.com)" 
                        ValidationExpression="\w+([-+.']\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*"></asp:RegularExpressionValidator>
                </td>
            </tr>
            <tr>
                <td>
                    User Type</td>
                <td>
                    <asp:DropDownList ID="DropDownList1" runat="server" Height="20px" Width="131px">
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Label ID="lbuser" runat="server" Text="Username"></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="tbusername" runat="server"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Label ID="lbpass" runat="server" Text="Password"></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="tbpassword" runat="server"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Button ID="btninsert" runat="server" onclick="btninsert_Click" 
                        Text="Insert" />
                </td>
                <td>
                    <asp:Button ID="btnupdate" runat="server" onclick="btnupdate_Click" 
                        Text="Update" />
                </td>
            </tr>
            <tr>
                <td>
                    &nbsp;</td>
                <td>
                    &nbsp;</td>
            </tr>
        </table>
        <br />
    </asp:Panel>
    <table class="style7">
        <tr>
            <td class="style8">
                <asp:DetailsView ID="DetailsView1" runat="server" AutoGenerateRows="False" 
                    Height="50px" Width="364px" onmodechanging="DetailsView1_ModeChanging">
                    <Fields>
                        <asp:BoundField DataField="father_name" HeaderText="Father name" />
                        <asp:BoundField DataField="mother_name" HeaderText="Mother Name" />
                        <asp:BoundField DataField="father_qualification" 
                            HeaderText="Father Qualification" />
                        <asp:BoundField DataField="mother_qualification" 
                            HeaderText="Mother Qualification" />
                        <asp:BoundField DataField="father_occupation" HeaderText="Father Occupation" />
                        <asp:BoundField DataField="mother_occupation" HeaderText="Mother Occupation" />
                        <asp:BoundField DataField="phone_no" HeaderText="Contact No" />
                        <asp:BoundField DataField="permanent_address" HeaderText="Address" />
                        <asp:BoundField DataField="parent_emailid" HeaderText="email id" />
                        <asp:TemplateField>
                            <ItemTemplate>
                                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                <asp:Button ID="btnedit" runat="server" 
                                    CommandArgument='<%# Eval("parent_id") %>' CommandName="Edit" 
                                    oncommand="btnedit_Command" Text="Edit" CausesValidation="False" />
                                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                <asp:Button ID="btndelete" runat="server" 
                                    CommandArgument='<%# Eval("parent_id") %>' CommandName="Delete" 
                                    oncommand="btndelete_Command" Text="Delete" CausesValidation="False" />
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Fields>
                </asp:DetailsView>
            </td>
            <td class="style8">
                </td>
        </tr>
        <tr>
            <td colspan="2">
                &nbsp;</td>
        </tr>
        <tr>
            <td>
                <asp:DetailsView ID="DetailsView2" runat="server" AutoGenerateRows="False" 
                    Height="50px" Width="360px">
                    <Fields>
                        <asp:BoundField DataField="father_name" HeaderText="Father Name" />
                        <asp:BoundField DataField="mother_name" HeaderText="Mother Name" />
                        <asp:BoundField DataField="father_qualification" 
                            HeaderText="Father Qualification" />
                        <asp:BoundField DataField="mother_qualification" 
                            HeaderText="Mother qualification" />
                        <asp:BoundField DataField="father_occupation" HeaderText="Father Occupation" />
                        <asp:BoundField DataField="mother_occupation" HeaderText="Mother Occupation" />
                        <asp:BoundField DataField="phone_no" HeaderText="Contact No" />
                        <asp:BoundField DataField="permanent_address" HeaderText="Address" />
                        <asp:BoundField DataField="parent_emailid" HeaderText="email id" />
                    </Fields>
                </asp:DetailsView>
            </td>
            <td>
                &nbsp;</td>
        </tr>
        <tr>
            <td>
                &nbsp;</td>
            <td>
                &nbsp;</td>
        </tr>
    </table>
    <p>
    </p>
</asp:Content>
